import { isCssLength, isPositiveInteger, validator } from "@ui/utils/pop";
import { EventChange } from "@ui/utils/var";
import { ExtractPropTypes } from "vue";
export const formTableProps = {
  cols: {
    type: Array,
    default: () => [] as ZTableCol[]
  },
  auto: {
    type: [String, Number],
    validator: validator('auto', isPositiveInteger)
  },
  basis: {
    type: [String, Number],
    validator: validator('basis', isCssLength)
  },
  data: {
    type: Array,
    default: () => []
  },
  mainId: {
    type: String,
    require: true
  }
}
export const formTableEmits = {
  [EventChange]: (v: { name: string, index: number, v: any }) => true
}
export type FormTableProps = ExtractPropTypes<typeof formTableProps>
export type FormTableEmits = typeof formTableEmits